package com.study.myteach.组合模式;

/**
 * @author lk
 * @date 2021/4/3 0003 15:35
 * @description:
 */
public class DemoTest {
    public static void main(String[] args) {
        Line line1 = new Line();
        Line line2 = new Line();
        Rectange rectange = new Rectange();
        CompositeShape compositeShape = new CompositeShape();
        compositeShape.add(line1);
        compositeShape.add(line2);
        compositeShape.add(rectange);
        compositeShape.draw();
    }
}
